<template>
	<view>
		
		<view v-if="userList && userList.length>0">
			<uni-card v-for="(item,index) in userList" :key="item.userId" :title="item.nickName" @click="toManagement(item.userId)">
		
				
				<view class="card-content">
					<view class="card-item">
						<view>部门：</view>
						<view>{{item.dept.deptName}}</view>
					</view>
					<view class="card-item">
						<view>手机号：</view>
						<view>{{item.phonenumber}}</view>
					</view>
					
				</view>
		
			</uni-card>
		</view>
		<view v-else>
			<image style="width: 100%;" mode="aspectFit" src="/static/empty.png"></image>
		</view>
		
		<view style="height: 200rpx;"></view>
		
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
				userList:[],
				showStatus:true,
			}
		},
		onShow(){
			this.getManagementList()
		},
		methods: {
			getManagementList() {
				this.$http({
					url: '/wx/wxPoiApply/getManagementList',
					method: 'get',
				}).then(res => {
					
					this.showStatus = false
					this.userList = res.rows
					
					this.$nextTick(() => {
						this.showStatus = true;
					})
				})
			},
			toManagement(userId){
				uni.navigateTo({
					url:'/pages/apply/management/management?userId='+encodeURIComponent(userId)
				})
			}
		}
	}
</script>

<style lang="scss">

.extra10000 {
	color: #18bc37;
	//border: solid 1rpx #18bc37;
}
.card-content {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	flex-wrap: wrap;
	width: 100%;

	.card-item {
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}

	.card-item:nth-child(1) {
		width: 100%;
	}

	.card-item:nth-child(2) {
		width: 100%;
	}

	.card-item:nth-child(3) {
		width: 100%;
	}
}

</style>
